

#include "memcpy.h"

void MEMORY_COPY( void * dest, const void * source, int n )
{
	unsigned char * pDest = (unsigned char *)dest;
	const unsigned char * pSource = (const unsigned char *)source;
	
	for( int i = 0; i < n; ++i )
	{
		*pDest = *pSource;
		++pDest;
		++pSource;
	}
}

void MEMORY_SET( void * dest, int val, int n )
{
	unsigned char * pDest = (unsigned char *)dest;

	for( int i = 0; i < n; ++i )
	{
		*pDest = val;
		++pDest;
	}
}